﻿using System.Collections.Generic;
using Orchard.Environment.Extensions;
using System.Web.Mvc;

namespace FruitCake.SimpleGallery.ViewModels {

    [OrchardFeature("FruitCake.SimpleGallery")]
    public class SimpleGalleryPartEditViewModel {

        public string Path { get; set; }

        public int FrameWidth { get; set; }
        public int FrameHeight { get; set; }

        public int PageSize { get; set; }
        public int PagerMaxItems { get; set; }
        public bool EnableThumbnail { get; set; }
        public Models.TitleMode TitleMode { get; set; }
        public string TitleSeparator { get; set; }
        public Models.LinkMode LinkMode { get; set; }

        public int ImageCount { get; set; }
        public IEnumerable<Models.SimpleGalleryImage> FirstImages { get; set; }

        public SelectList PrepareTitleModeList() {                                    
            return new SelectList(System.Enum.GetNames(typeof(Models.TitleMode)), "", "", TitleMode.ToString());
        }

        public SelectList PrepareLinkModeList()
        {
            return new SelectList(System.Enum.GetNames(typeof(Models.LinkMode)), "", "", LinkMode.ToString());
        }
    }

}
